Skip to main content

chartJSONData

Type

property

Summary

Gets or sets the data to display the chart in JSON format

Syntax

set the chartJSONData of widget to <JSON string>
get the chartJSONData of widget

Description

This property exposes the whole javascript chart.data object to LCS , allowing experienced users with chartjs to make advanced charts by setting this property (JSON format).

Warning: Several properties will be affected when setting this property directly like csvData, dataLabels and chartDataBackgroundColors.

Examples

on mouseUp
put "{ 'labels': [ 'Tokyo', 'Mumbai', 'Mexico City', 'Shanghai', 'Sao Paulo', 'New York', 'Karachi', 'Buenos Aires', 'Delhi', 'Moscow' ], 'datasets': [ { 'label': 'Series 1', 'data': [500, 50, 2424, 14040, 14141, 4111, 4544, 47, 5555, 6811], 'fill': true, 'borderColor': '#2196f3', 'backgroundColor': '#2196f3', 'borderWidth': 1 }, { 'label': 'Series 2', 'data': [1288, 88942, 44545, 7588, 99, 242, 1417, 5504, 75, 457], 'fill': true, 'borderColor': '#4CAF50', 'backgroundColor': '#4CAF50', 'borderWidth': 1 } ] }" into tJSON
replace "'" with quote in tJSON
set the lockChartUpdates of widget "Chart View" to true
set the chartJSONData of widget "Chart View" to tJSON
set the lockChartUpdates of widget "Chart View" to false
end mouseUp

Compatibility and Support

OS

mac

windows

linux

ios

android

web